package com.ebay.services;
import com.ebay.util.*;
import com.opensymphony.*;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

import java.util.*;
import java.sql.*;

public class getbankNames extends ActionSupport {
	public ArrayList<String> banknames=new ArrayList<String>();
	DBconn db;
	Connection con;
	public String accntType;
	Statement st;
	Map session;
	public String getBank() {
		session=ActionContext.getContext().getSession();
		System.out.println("bank type"+accntType);
		session.put("accntType",accntType);
		con=db.getConnection();
		try {
			st=con.createStatement();
			ResultSet rs=st.executeQuery("select bank_name from bank_name");
			while(rs.next()){
				banknames.add(rs.getString("bank_name"));
				
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			System.out.println("error"+e.getMessage());
			e.printStackTrace();
		}
		return "success";
	}
		
		
	}


